package org.hubwork.base.common;

import java.util.List;

import org.springframework.stereotype.Repository;

@Repository
public class HubT1DAOImplMyBatis implements HubT1DAO{
	
	@Override
	public void save(HubT1 t1) throws Exception {		
		ContextSupport.setCurrentSqlSessionFactoryKey("B_HUB1");
		HubApplicationContext.get(DynamicSqlSessionDaoSupport.class).getSqlSession().insert("T1.save", t1);
	}
	
	@SuppressWarnings("unchecked")
	public List<HubT1> find() throws Exception {
		ContextSupport.setCurrentSqlSessionFactoryKey("B_HUB1");
		return HubApplicationContext.get(DynamicSqlSessionDaoSupport.class).getSqlSession().selectList("T1.findAll");		
	} 

}
